#include <iostream>
#include "Rational.h"

using namespace std;

int main( void )
{
    Rational fraction1( 2, 4 ); 
    Rational fraction2( 8, 16 );
    fraction2.reciprocate();
    
    cout << "Fraction 1: " << fraction1 << endl;
    cout << "Fraction 2: " << fraction2 << endl;
    
    cout << fraction1 << " = "  << fraction2 << "  ? " << (fraction1 == fraction2) << endl;
    cout << fraction1 << " != " << fraction2 << " ? "  << (fraction1 != fraction2) << endl;
    cout << fraction1 << " < "  << fraction2 << "  ? " << (fraction1 <  fraction2) << endl;
    cout << fraction1 << " <= " << fraction2 << " ? "  << (fraction1 <= fraction2) << endl;
    cout << fraction1 << " > "  << fraction2 << "  ? " << (fraction1 >  fraction2) << endl;
    cout << fraction1 << " >= " << fraction2 << " ? "  << (fraction1 >= fraction2) << endl;
    
    cout << fraction1 << " + " << fraction2 << " = " << fraction1 + fraction2 << endl;
    cout << fraction1 << " - " << fraction2 << " = " << fraction1 - fraction2 << endl;
    cout << fraction1 << " * " << fraction2 << " = " << fraction1 * fraction2 << endl;
    cout << fraction1 << " / " << fraction2 << " = " << fraction1 / fraction2 << endl;
    
    cout << fraction1 << " reduced = " << fraction1.reduced() << endl;
    cout << fraction2 << " reduced = " << fraction2.reduced() << endl;
    
    cout << fraction1 << " + 2 = " << (fraction1 + 2) << endl;
    cout << fraction1 << " - 2 = " << (fraction1 - 2) << endl;
    cout << fraction1 << " * 2 = " << (fraction1 * 2) << endl;
    cout << fraction1 << " / 2 = " << (fraction1 / 2) << endl;
    
    return 0;
}
